package com.cloud.test.cloudribbon.biz;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloController {

    @Resource(name = "helloServiceImpl")
    HelloService helloService;

    @Resource
    HelloClient helloClient;

    @RequestMapping(value = "/hi")
    public String hi(@RequestParam String name){
        return helloClient.hi(name);
    }

    @RequestMapping(value = "/hi1")
    public String hi1(@RequestParam String name){
        return helloService.hiService1(name);
    }
}